<template>
  <div>
    <table-frame
      ref="frame"
      :removeKey="prop.removeKey"
      :getDataUrl="prop.getDataUrl"
      :removeUrl="prop.removeUrl"
      :searchShow="prop.searchShow"
      :operateShow="prop.operateShow"
      :location="prop.location"
      :searchModel="prop.searchModel"
      :reloadTable="prop.reloadTable"
      :colunmsCount="prop.colunmsCount"
      :showDelBtn="prop.showDelBtn"
      :delBtnPermission="prop.delBtnPermission"
    >
      <template slot="top_operate" slot-scope="currentRow">

      </template>

      <template slot="columns">
        <el-table-column align="center" prop="content" label="反馈内容"></el-table-column>
        <el-table-column align="center" prop="realName" label="用户"></el-table-column>
        <el-table-column align="center" prop="userCode" label="用户编码"></el-table-column>
        <el-table-column
          prop="createTime"
          sortable
          width="250"
          align="center"
          label="创建时间"
        ></el-table-column>
        <el-table-column
          prop="updateTime"
          sortable
          align="center"
          width="250"
          label="更新时间"
        ></el-table-column>
      </template>
      <template v-if="prop.operateShow" slot="operate">
        <el-table-column fixed="right" align="center" label="操作" width="200">
          <template slot-scope="scope">

          </template>
        </el-table-column>
      </template>
    </table-frame>
  </div>
</template>
<script>
let _this = {};
import searchModel from "./Search.vue";

export default {
  data() {
    return {
      dialog: {
        width: "40%",
        title: "新增/修改",
        visible: false,
        modal: true,
      },
      prop: {
        searchShow: true,
        operateShow: false,
        location: "用户反馈",
        getDataUrl: "/feedBack/pageList",
        removeUrl: "",
        searchModel: searchModel,
        removeKey: 'id',
        reloadTable: false,
        showDelBtn: false,
        isPage: true,
        delBtnPermission: ""
      },
      form: {},

      permission: {},

      rules: {},
      URL: {},
    };
  },
  created() {
  },
  methods: {

    del(id) {
      this.$confirm("此操作将永久删除已选数据, 是否继续?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      }).then(() => {
        this.$del(this.URL.remove.replace("?", id), {}).then((res) => {
          if (res.R) {
            this.$success("已删除");
            this.reloadTable();
          }
        });
      });
    },
    reqResult(res) {
      if (res.R) {
        this.$success("操作成功");
        this.dialog.visible = false;
        this.setDataToForm(null);
        this.reloadTable();
      }
    },

    reloadTable() {
      _this = this;
      this.prop.reloadTable = true;
      setTimeout(() => {
        _this.prop.reloadTable = false;
      }, 1000);
    },
  },
};
</script>
<style>
</style>
<style scoped>
</style>
